default:
    @just --list

build:
    cabal build

build-profile:
    cabal --enable-profiling build \
        --ghc-options='-fprof-auto -rtsopts -fPIC -fexternal-dynamic-refs'

build-watch:
    while inotifywait -qqre modify .; do \
        cabal build; \
    done

repl:
    cabal repl

switch-to-local:
    rm -f bin/x11/libgodot-haskell-plugin.so
    cp $(cabal list-bin flib:godot-haskell-plugin) bin/x11/libgodot-haskell-plugin.so

switch-to-nix:
    rm -f bin/x11/libgodot-haskell-plugin.so

clean:
    cabal clean
    rm -f bin/x11/libgodot-haskell-plugin.so
